<?php
/**
 * SmartCity-CMS: An Extensible Content Management System.
 *
 * @copyright   Copyright (c) 2017 http://www.brsttech.com All rights reserved.
 * @license     Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
 */
//应用入口文件
//Nginx1.6不支持PATH_INFO
if($_SERVER['QUERY_STRING']){
	$url_param     = '?'.$_SERVER['QUERY_STRING'];
	$start_counts  = stripos($_SERVER['REQUEST_URI'],$url_param); //?URL参数在URL开始位置
	$url_param_len = strlen($url_param);  //返回参数的长度
	$_SERVER['PATH_INFO'] = substr_replace($_SERVER['REQUEST_URI'],"",$start_counts,$url_param_len); //删除?后面的参数
}else{
	$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
}
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 绑定到index模块
require __DIR__ . '/../thinkphp/start.php';